﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Script.Serialization;
using System.Diagnostics;
using System.Net;
using TCMS.Models;
using TCMS.Models.Entities;
using TCMS.Models.DAO;
using System.Web.Security;
using tcms.Miscellaneous;

namespace tcms.Controllers
{
	[Authorize]
	public class HomeController : Controller
	{
		//
		// GET: /Home/

		public ActionResult Index()
		{
			if (HttpContext.User.IsInRoles("admin", "manager"))
			{
				return RedirectToAction("Index", "ShopFloor");
			}
			else
			{
				return RedirectToAction("Tasks");
			}
		}

		public ActionResult Tasks()
		{
            return RedirectToAction("Index", "Task");
		}
	}
}
